<?php
namespace AbstractFactoryPattern;

function test() {
    
    $factoryProducer = new FactoryProducer();
    $shapeFactory = $factoryProducer->getFactory('shape');
   
    $squareObj = $shapeFactory->getShape('square');
    $squareObj->draw();
    
    $circleObj = $shapeFactory->getShape('circle');
    $circleObj->draw();

    $colorFactory = $factoryProducer->getFactory('color');
    
    $redObj = $colorFactory->getColor('red');
    $redObj->fill();
    $pinkObj = $colorFactory->getColor('pink');
    $pinkObj->fill();

}
